package com.cne.gmail.Gmail.intercepotor;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
            registry.addInterceptor(new CorsInterceptor())
                    .addPathPatterns("/**");
            registry.addInterceptor(new UserLoginInterceptor())
                    .addPathPatterns("/**")
                    .excludePathPatterns("/user/login","/user/logout","/wechat/handle","/payment/approvedCallBack",
                            "/payment/payoutCallBack", "/swagger-resources/**", "/error", "/express/api/integration/**",
                            "/logistics/tracking/**","/test/ip");
    }
}
